﻿using System.Collections.Generic;

namespace Sai.Core
{
    public class RemovedTypesListingFactory : ITypeListingFactory
    {
        public ITypeListing Create(IEnumerable<IAssemblyDifference> differences)
        {
            var listing = new TypeListingByNamespace
            {
                Name = "Removed Types"
            };

            foreach (var diff in differences)
            {
                if (diff.RemovedTypes != null)
                    listing.Add(diff.RemovedTypes);
            }

            return listing;
        }
    }
}
